<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateClassifyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('classify', function (Blueprint $table) {
            $table->increments('id');
            $table -> integer('pid')->default(0)->comment('父级分类id');
            $table -> string('name')->nullable()->comment('分类名称');
            $table -> integer('sort')->nullable()->comment('排序');
            $table -> string('type')->nullable()->comment('类型');
            $table -> softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
